/* Integration points (quadratures)
   Jukka Toivanen, Jan Stebel
*/

#include "lindiscpoint.h"



template<>
inline int LinDiscPoint<3>::mapDof(int e, int n)
{
	return e*4+n;
}

template<>
inline int LinDiscPoint<3>::mapDof(int e, int n, int p)
{
	throw 1;
}




template<>
inline int LinDiscPoint<2>::mapDof(int e, int n)
{
	return imesh->getNvolumes()*4+e*3+n;
}


template<>
inline int LinDiscPoint<2>::mapDof(int e, int n, int p)
{
	return imesh->getFaceParentNo(e, p)*4+imesh->getFaceParentNodeNo(e,p,n);
}


template<>
inline int LinDiscPoint<1>::mapDof(int e, int n)
{
	return imesh->getNvolumes()*4 + imesh->getNfaces()*3 + e*2+n;
}

template<>
inline int LinDiscPoint<1>::mapDof(int e, int n, int p)
{
	return imesh->getNvolumes()*4+imesh->getEdgeParentNo(e, p)*3+imesh->getEdgeParentNodeNo(e,p,n);
}



template class LinDiscPoint<1>;
template class LinDiscPoint<2>;
template class LinDiscPoint<3>;
